package com.rxh.utils;

/**
 * Created with IntelliJ IDEA.
 * User: 陈俊雄
 * Date: 2018/10/24
 * Time: 10:46
 * Project: Management
 * Package: com.rxh.utils
 */
public class StringUtils extends org.apache.commons.lang3.StringUtils {
    /**
     * StringUtils.getStrInsteadOfNull(null)        == ""
     * StringUtils.getStrInsteadOfNull("")          == ""
     * StringUtils.getStrInsteadOfNull("abc")       == "abc"
     *
     * @param str 传入字符串
     * @return 不为Null的字符串
     */
    public static String getToStringInsteadOfNull(final Object str) {
        return str == null ? EMPTY : str.toString();
    }
}
